<!-- include tpl=head_lay -->
<script type="text/javascript" src="{func add_js user.js}"></script>
<div class="layui-card"{if !$group_id && !$keywords} style="display:none"{/if} id="search_html">
	<div class="layui-card-header">{lang搜索}</div>
	<div class="layui-card-body">
		<form method="post" action="{url ctrl=user/}" class="layui-form">
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">{lang会员组}</label>
				<div class="layui-input-inline">
					<select name="group_id">
						<option value="">{lang全部}</option>
						<!-- loop from=$grouplist key=$key value=$value id=$tmpid -->
						<option value="{$value.id}"{if $group_id == $value.id} selected{/if}>{$value.title}</option>
						<!-- /loop -->
					</select>
				</div>
			</div>
			<!-- loop from=$flist key=$key value=$value id=$tmpid -->
			<div class="layui-inline">
				<label class="layui-form-label">{$value}</label>
				<div class="layui-input-inline">
					<input type="text" name="keywords[{$key}]" class="layui-input" value="{$keywords[$key]}" />
				</div>
			</div>
			<!-- /loop -->
			<div class="layui-inline">
				<div class="layui-input-inline">
					<input type="submit" value="{lang搜索}" class="layui-btn layui-btn-normal" />
					<input type="button" value="{lang取消搜索}" onclick="$.phpok.go('{url ctrl=user/}')" class="layui-btn" />
				</div>
			</div>
		</div>
		</form>
	</div>
</div>
<div class="layui-card">
	<div class="layui-card-header">
		{lang列表}
		<div class="fr"><div class="action"></div></div>	
		<div class="layui-btn-group fr" id="user_card_top">
			<button class="layui-btn layui-btn-sm" onclick="$.admin.hide_show('search_html')">
				<i class="layui-icon">&#xe615;</i>
				搜索
			</button>
			<button class="layui-btn layui-btn-sm" onclick="$.win('{lang添加会员}','{url ctrl=user func=set/}')">
				<i class="layui-icon">&#xe654;</i>
				{lang添加会员}
			</button>
			<!-- if $session.admin_rs.if_system -->
			<button class="layui-btn layui-btn-sm" onclick="$.admin_user.show_setting()">
				<i class="layui-icon">&#xe620;</i>
				{lang显示字段设置}
			</button>
			<!-- /if -->
		</div>
	</div>
	<div class="layui-card-body">
		<table width="100%" class="layui-table" lay-size="sm">
		<thead>
		<tr>
			<th align="center">ID</th>
			<th width="20px">&nbsp;</th>
			<th width="35px"></th>
			<!-- loop from=$arealist key=$key value=$value -->
			<th class="lft">{func P_Lang $value}</th>
			<!-- /loop -->
			<!-- loop from=$wlist key=$key value=$value id=$tmpid -->
			<th class="lft" style="min-width:100px;">{$value.title}</th>
			<!-- /loop -->
			<th width="120px">{lang注册时间}</th>
			<th style="min-width:104px;"></th>
		</tr>
		</thead>
		<!-- $rslist AS $key=>$value -->
		<tr>
			<td align="center">{$value.id}</td>
			<td><span id="status_{$value.id}" onclick="set_status({$value.id})" class="status{$value.status}" value="{$value.status}"></span></td>
			<td align="center"><img src="{$value.avatar ? $value.avatar : 'images/user_default.png'}" border="0" width="24px" height="24px" /></td>
			<!-- loop from=$arealist key=$k value=$v -->
			<td align="left">
				<!-- if is_array($value[$k]) -->
					<!-- if $value[$k]['_admin']['type'] == 'pic' -->
					<img src='{$value[$k]["_admin"]["info"]}' border="0" width="28px" height="28px" />
					<!-- else -->
					{$value[$k]['_admin']['info']}			
					<!-- /if -->
				<!-- else -->
					<!-- if $k == 'group_id' -->
					{$grouplist[$value[$k]][title]}
					<!-- else -->
					{$value[$k]}
					<!-- /if -->
				<!-- /if -->
			</td>
			<!-- /loop -->
			<!-- loop from=$wlist key=$k value=$v -->
			<td class="lft">
				<div>{$value.wealth[$k] ? $value.wealth[$k] : 0} {$v.unit}</div>
				<div class="layui-btn-group">
					<input type="button" value="{lang调整}" onclick="action_wealth('{$v.title}','{$v.id}','{$value.id}','{$v.unit}')" class="layui-btn layui-btn-xs" />
					<input type="button" value="{lang日志}" onclick="show_wealth_log('{$v.title}','{$v.id}','{$value.id}')" class="layui-btn layui-btn-xs" />
				</div>
			</td>
			<!-- /loop -->
			<td>{func date 'Y-m-d H:i' $value.regtime}</td>
			<td>
				<div class="layui-btn-group">
					<input type="button" value="{lang编辑}" onclick="$.win('{lang编辑会员}_#{$value.id}','{url ctrl=user func=set id=$value.id/}')" class="layui-btn layui-btn-xs" />
					<!-- if $config.biz_status -->
					<input type="button" value="{lang地址}" onclick="$.admin_user.address({$value.id})" class="layui-btn layui-btn-xs" />
					<!-- /if -->
					<input type="button" value="{lang删除}" onclick="del({$value.id},'{$value.user}')" class="layui-btn layui-btn-xs layui-btn-danger" />
				</div>
			</td>
		</tr>
		<!-- end -->
		</table>
		<!-- if $pagelist --><div class="center"><!-- include tpl=pagelist --></div><!-- /if -->
	</div>
</div>
<!-- include tpl=foot_lay -->